import { lazy } from "react";
import { Navigate } from 'react-router-dom'

const Home = lazy(() => import('../page/Home/Index'));
const Index = lazy(() => import('../page/Index/Index'));
const My = lazy(() => import('../page/My/Index'));


const routerchildren = [
    {
        path: '/home/index',
        element: <Index />,
    }, {
        path: '/home/my',
        element: <My />
    }
]


const router = [
    {
        path: '/',
        element: <Navigate to={'/home'} />,
    }, {
        path: "/home",
        element: <Home />,
        children: routerchildren
    }
]

export default router;